<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Icarous: /home/research133/Software/Icarous2/cFS/apps/SBN/fsw/platform_inc/sbn_tbl.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Icarous
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_c1698e121239b1aba7f6e782e4514e49.html">cFS</a></li><li class="navelem"><a class="el" href="dir_7ee4ce95da95d11e80a01c5101ed8d14.html">apps</a></li><li class="navelem"><a class="el" href="dir_ae2fc4977a0e23c0ce15dc1827c136ad.html">SBN</a></li><li class="navelem"><a class="el" href="dir_e819abd219528ad66dc3d14d7a96e6e4.html">fsw</a></li><li class="navelem"><a class="el" href="dir_f4a154d10948ceddc6abd5711dc8a4df.html">platform_inc</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">sbn_tbl.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef _sbn_tbl_h_</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define _sbn_tbl_h_</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;cfe.h&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;sbn_platform_cfg.h&quot;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#define SBN_ADDR_SZ 16 </span><span class="comment">/* TODO: move to constants.h? */</span><span class="preprocessor"></span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">/****</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * @brief The config table contains entries for peers (other CPU&#39;s),</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * modules (back-end libraries used to talk to peers), networks</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * (all peers that communicate amonsgt each other using a specific</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * protocol/network technology), and interfaces (the interconnection</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * between the &quot;host&quot; end and the peer end of the network.)</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="structSBN__Mod__Entry__t.html">   16</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;{</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <span class="keywordtype">char</span> Name[SBN_MAX_MOD_NAME_LEN];</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <span class="keywordtype">char</span> LibFileName[OS_MAX_PATH_LEN];</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    <span class="keywordtype">char</span> LibSymbol[OS_MAX_API_NAME];</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;} <a class="code" href="structSBN__Mod__Entry__t.html">SBN_Mod_Entry_t</a>;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="structSBN__Peer__Entry__t.html">   23</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;{   </div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    uint32 ProcessorID;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    uint32 SpacecraftID;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    uint16 NetNum;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    uint16 ModIdx;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    uint8 Address[SBN_ADDR_SZ];</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;} <a class="code" href="structSBN__Peer__Entry__t.html">SBN_Peer_Entry_t</a>;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="structSBN__ConfTbl__t.html">   32</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;{</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <a class="code" href="structSBN__Mod__Entry__t.html">SBN_Mod_Entry_t</a> Mods[SBN_MAX_MOD_CNT];</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    uint16 ModCnt;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <a class="code" href="structSBN__Peer__Entry__t.html">SBN_Peer_Entry_t</a> Peers[SBN_MAX_PEER_CNT];</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    uint16 PeerCnt;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;} <a class="code" href="structSBN__ConfTbl__t.html">SBN_ConfTbl_t</a>;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="comment">/****</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="comment"> * @brief The RemapTbl defines, for a peer, which MID&#39;s should be remapped</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="comment"> * (listing a &quot;from&quot; MID and a &quot;to&quot; MID, determining when a message is</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="comment"> * published locally with the &quot;from&quot; MID, it is sent to the peer with the &quot;to&quot;</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="comment"> * MID.)</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="comment"> * The RemapTbl must be sorted and unique for ProcessorID + from</span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="comment"> * Logic is as follows:</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="comment"> * for each message-&gt;</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="comment"> *      if there&#39;s an entry-&gt;</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="comment"> *          if the &quot;to&quot; is defined-&gt;remap the MID to the new MID</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="comment"> *              (note new MID can be the same as the old MID to send unmodified)</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="comment"> *          else-&gt;ignore the message</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="comment"> *      else-&gt;</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="comment"> *          if the RemapDefaultFlag == SBN_REMAP_DEFAULT_IGNORE-&gt;</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="comment"> *              ignore the message</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="comment"> *          else-&gt;send the message on unmodified</span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="structSBN__RemapTblEntry__t.html">   59</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;{</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structSBN__RemapTblEntry__t.html#a094f7c821ab7ecd43d48f59644afb714">   62</a></span>&#160;    uint32 <a class="code" href="structSBN__RemapTblEntry__t.html#a094f7c821ab7ecd43d48f59644afb714">ProcessorID</a>;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="structSBN__RemapTblEntry__t.html#a5ccb1f1e95ed9074eb77f84c30c55f2e">   65</a></span>&#160;    CFE_SB_MsgId_t <a class="code" href="structSBN__RemapTblEntry__t.html#a5ccb1f1e95ed9074eb77f84c30c55f2e">FromMID</a>;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="structSBN__RemapTblEntry__t.html#aa98bb7235c51890df046a2c73011220c">   68</a></span>&#160;    CFE_SB_MsgId_t <a class="code" href="structSBN__RemapTblEntry__t.html#aa98bb7235c51890df046a2c73011220c">ToMID</a>;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;}</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<a class="code" href="structSBN__RemapTblEntry__t.html">SBN_RemapTblEntry_t</a>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="preprocessor">#define SBN_REMAP_TABLE_SHARENAME &quot;SBN.RemapTbl&quot;</span></div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="preprocessor">#define SBN_REMAP_DEFAULT_IGNORE 0</span></div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="preprocessor">#define SBN_REMAP_DEFAULT_SEND 1</span></div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="preprocessor">#define SBN_REMAP_TABLE_SIZE 256</span></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="structSBN__RemapTbl__t.html">   88</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;{</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="structSBN__RemapTbl__t.html#a6be6004ce10c9b2687026a2f37b11907">   91</a></span>&#160;    uint32 <a class="code" href="structSBN__RemapTbl__t.html#a6be6004ce10c9b2687026a2f37b11907">RemapDefaultFlag</a>;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="structSBN__RemapTbl__t.html#a150b32a56da3fbffd02739f3044d70be">   94</a></span>&#160;    uint32 <a class="code" href="structSBN__RemapTbl__t.html#a150b32a56da3fbffd02739f3044d70be">EntryCnt</a>;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="structSBN__RemapTbl__t.html#a75c19bee4bb7866766794833346fad77">   97</a></span>&#160;    <a class="code" href="structSBN__RemapTblEntry__t.html">SBN_RemapTblEntry_t</a> Entries[SBN_REMAP_TABLE_SIZE];</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;}</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<a class="code" href="structSBN__RemapTbl__t.html">SBN_RemapTbl_t</a>;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;int32 SBN_LoadTbl(<a class="code" href="structSBN__RemapTbl__t.html">SBN_RemapTbl_t</a> **TblPtr);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* _sbn_tbl_h_ */</span><span class="preprocessor"></span></div><div class="ttc" id="structSBN__RemapTbl__t_html_a150b32a56da3fbffd02739f3044d70be"><div class="ttname"><a href="structSBN__RemapTbl__t.html#a150b32a56da3fbffd02739f3044d70be">SBN_RemapTbl_t::EntryCnt</a></div><div class="ttdeci">uint32 EntryCnt</div><div class="ttdoc">The number of entries in the table (determined at runtime.) </div><div class="ttdef"><b>Definition:</b> sbn_tbl.h:94</div></div>
<div class="ttc" id="structSBN__RemapTbl__t_html"><div class="ttname"><a href="structSBN__RemapTbl__t.html">SBN_RemapTbl_t</a></div><div class="ttdef"><b>Definition:</b> sbn_tbl.h:88</div></div>
<div class="ttc" id="structSBN__RemapTbl__t_html_a6be6004ce10c9b2687026a2f37b11907"><div class="ttname"><a href="structSBN__RemapTbl__t.html#a6be6004ce10c9b2687026a2f37b11907">SBN_RemapTbl_t::RemapDefaultFlag</a></div><div class="ttdeci">uint32 RemapDefaultFlag</div><div class="ttdoc">Behavior for MID&amp;#39;s not found in this table. </div><div class="ttdef"><b>Definition:</b> sbn_tbl.h:91</div></div>
<div class="ttc" id="structSBN__RemapTblEntry__t_html_aa98bb7235c51890df046a2c73011220c"><div class="ttname"><a href="structSBN__RemapTblEntry__t.html#aa98bb7235c51890df046a2c73011220c">SBN_RemapTblEntry_t::ToMID</a></div><div class="ttdeci">CFE_SB_MsgId_t ToMID</div><div class="ttdoc">The MID to send to the peer. If 0x0000, filter the from MID. </div><div class="ttdef"><b>Definition:</b> sbn_tbl.h:68</div></div>
<div class="ttc" id="structSBN__Peer__Entry__t_html"><div class="ttname"><a href="structSBN__Peer__Entry__t.html">SBN_Peer_Entry_t</a></div><div class="ttdef"><b>Definition:</b> sbn_tbl.h:23</div></div>
<div class="ttc" id="structSBN__Mod__Entry__t_html"><div class="ttname"><a href="structSBN__Mod__Entry__t.html">SBN_Mod_Entry_t</a></div><div class="ttdef"><b>Definition:</b> sbn_tbl.h:16</div></div>
<div class="ttc" id="structSBN__RemapTblEntry__t_html"><div class="ttname"><a href="structSBN__RemapTblEntry__t.html">SBN_RemapTblEntry_t</a></div><div class="ttdef"><b>Definition:</b> sbn_tbl.h:59</div></div>
<div class="ttc" id="structSBN__RemapTblEntry__t_html_a094f7c821ab7ecd43d48f59644afb714"><div class="ttname"><a href="structSBN__RemapTblEntry__t.html#a094f7c821ab7ecd43d48f59644afb714">SBN_RemapTblEntry_t::ProcessorID</a></div><div class="ttdeci">uint32 ProcessorID</div><div class="ttdoc">The ProcessorID of the peer to remap this MID for. </div><div class="ttdef"><b>Definition:</b> sbn_tbl.h:62</div></div>
<div class="ttc" id="structSBN__ConfTbl__t_html"><div class="ttname"><a href="structSBN__ConfTbl__t.html">SBN_ConfTbl_t</a></div><div class="ttdef"><b>Definition:</b> sbn_tbl.h:32</div></div>
<div class="ttc" id="structSBN__RemapTblEntry__t_html_a5ccb1f1e95ed9074eb77f84c30c55f2e"><div class="ttname"><a href="structSBN__RemapTblEntry__t.html#a5ccb1f1e95ed9074eb77f84c30c55f2e">SBN_RemapTblEntry_t::FromMID</a></div><div class="ttdeci">CFE_SB_MsgId_t FromMID</div><div class="ttdoc">The local MID I&amp;#39;ll receive from the pipe. </div><div class="ttdef"><b>Definition:</b> sbn_tbl.h:65</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
